<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
function yanz(){
	var a = document.forms["myForm"]["text"].value;
	var b = document.forms["myForm"]["pwd"].value;
	var c = document.forms["myForm"]["pwd1"].value;
	if(a!=${zhanghu.pwd}){
		alert("原密码错误，请重新输入！");
		return false;
	}else if(b.length != 6){
		alert("请输入一个六位数密码！  ")
		return false;
	}else if(b==""||c==""){
		alert("请输入一个六位数密码！ ")
		return false;
	}else if(b!=c){
		alert("两次密码输入不一致，请重新输入！")
		return false;
	}else{
		alert("密码修改成功，请重新登陆！");
		return true;
	}
}
</script>
<style type="text/css">
	#yjc{
		width: 400px;
		height: 240px;
		margin: 0px;
		padding: 30px 0;
	}
	#xpz{
		margin-top: 80px;
	}
	body{
		background-color:#FFF5EE;
	}
</style>
</head>
<body>
<center>
<div id="xpz">
	<img alt="" src="beijing/logo.jpg" width="650px" height="180px">
</div>
<div id="yjc">
	<form action="Xiugai?id=${zhanghu.id}" method="post" name="myForm" onsubmit="return yanz();">
	<h1 style="color:#000000">修改密码</h1>
		<table>
			<tbody>
				<tr>
					<td>请输入原密码：</td>
				</tr>
				<tr>
					<td>
						<input type = "text" name = "text" placeholder="输入原密码">
					</td>
				</tr>
				<tr>
					<td>请输入新密码：</td>
				</tr>
				<tr>
					<td>
						<input type="password" name="pwd" placeholder="输入新密码">
					</td>
				</tr>
				<tr>
					<td>请再次输入新密码：</td>
				</tr>
				<tr>
					<td>
						<input type="password" name="pwd1" placeholder="输入新密码">
					</td>
				</tr>
				<tr></tr><tr></tr><tr></tr>
			<tr>
				<td>
					<input type="submit" value="提交">&nbsp;
					<input type="reset" value="重置">&nbsp;
					<input type="button" value="返回" onclick="window.location='yhwelcome.jsp'">	
				</td>
			</tr>				
			</tbody>
		</table>
	</form>
</div>
</center>
</body>
</html>